package flc.ast.activity;

import android.view.View;

import com.bumptech.glide.Glide;

import flc.ast.BaseAc;
import flc.ast.HomeActivity;
import flc.ast.R;
import flc.ast.databinding.ActivityLongSpliceResultBinding;
import stark.common.basic.event.EventStatProxy;

public class LongSpliceResultActivity extends BaseAc<ActivityLongSpliceResultBinding> {

    public static String imgPath;

    @Override
    protected int onCreate() {
        return R.layout.activity_long_splice_result;
    }

    @Override
    protected void initView() {
        EventStatProxy.getInstance().statEvent1(this, mDataBinding.event1Container);

        mDataBinding.ivLongSpliceResultBack.setOnClickListener(v -> onBackPressed());

        mDataBinding.tvAgainSplice.setOnClickListener(this);
        mDataBinding.tvComplete.setOnClickListener(this);
    }

    @Override
    protected void onClickCallback(View v) {
        switch (v.getId()) {
            case R.id.tvAgainSplice://继续拼接
                finish();
                break;
            case R.id.tvComplete://完成
                startActivity(HomeActivity.class);
                break;
        }
    }

    @Override
    protected void initData() {
        Glide.with(mContext).load(imgPath).into(mDataBinding.ivImg);
    }
}